package com.bms.hystrix.interfaces.kyjlgl;

import com.bms.hystrix.pojo.ChuFangGuanLiChanXun;
import com.bms.hystrix.pojo.LaiFangGuanLiChanXun;
import com.bms.hystrix.pojo.LaiFangGuanLiGenXin;
import com.bms.hystrix.pojo.LaiFangGuanLiZhengJia;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

// 此接口与feign中定义的接口一样，直接迁移过来即可
// 调用一个子服务模块，需要在注解中指定，名字由client的yml文件定义
@FeignClient(value = "EUREKA-CLIENT-KYJLGL")
public interface LaiFangGuanLiInterface {
    @RequestMapping(value = "/laiFangGuanLi/chaXunFenYe",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> chaXunFenYe(@RequestParam(value = "laiFangGuanLiChanXun") LaiFangGuanLiChanXun laiFangGuanLiChanXun);

    @RequestMapping(value = "/laiFangGuanLi/shanChuById",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> shanChuById(@RequestParam(value = "id") String id);

    @RequestMapping(value = "/laiFangGuanLi/gengXinById",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> gengXinById(@RequestParam(value = "laiFangGuanLiGenXin") LaiFangGuanLiGenXin laiFangGuanLiGenXin);

    @RequestMapping(value = "/laiFangGuanLi/xinZeng",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> xinZeng(@RequestParam(value = "laiFangGuanLiGenXin") LaiFangGuanLiZhengJia laiFangGuanLiGenXin);

}
